package com.technology.education.ui.student.popularize

import androidx.lifecycle.MutableLiveData
import com.technology.education.data.model.InviteChargeRecordModel
import com.technology.education.data.model.InviteList
import com.technology.education.network.apiService
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.request
import me.hgj.jetpackmvvm.state.ResultState

class PopularizeDetailViewModel : BaseViewModel() {
    var info: InviteList? = null
    val result = MutableLiveData<ResultState<InviteChargeRecordModel>>()
    override fun getData() {
        super.getData()
        request({
            apiService.myInviteChargeList(
                hashMapOf(
                    "pageNo" to pageIndex,
                    "pageSize" to pageSize,
                    "memberId" to info?.id
                )
            )
        }, result)
    }
}